1 <%@ Application Language="C#" %>
2
3 <script runat=
"server">
4
5     
void Application_Start(object sender, EventArgs e)
6     {
7         
// Code that runs on application startup
8
9     }
10     
11     
void Application_End(object sender, EventArgs e)
12     {
13         
// Code that runs on application shutdown
14
15     }
16         
17     
void Application_Error(object sender, EventArgs e)
18     {
19         
// Code that runs when an unhandled error occurs
20
21     }
22
23     
void Session_Start(object sender, EventArgs e)
24     {
25         
// Code that runs when a new session is started
26         Session[
"GioHang"] = new ShoppingCart();
27         
//Session.Add("GioHang", "");
28         
//Session["GioHang"] = null;
29         
//Session["GioHang"] = null;
30         Session.Add(
"DangNhap", "F");
31         ///
/Session.Add("GioHang",Session.SessionID.ToString());
32
33         Session.Add(
"UserName", "");
34         Session.Add(
"KH","");
35         Session.Add(
"MaHD","");
36
37     }
38
39     
void Session_End(object sender, EventArgs e)
40     {
41         
// Code that runs when a session ends.
42         
// Note: The Session_End event is raised only when the sessionstate mode
43         
// is set to InProc in the Web.config file. If session mode is set to StateServer
44         
// or SQLServer, the event is not raised.
45         
//Session["GioHang"] = null;
46
47     }
48        
49 </script>



Quản lý website bán quần áo trực tuyến ASP.net 6.677 lượt xem

Gõ tìm kiếm nhanh...